/*
 * @# SerializerFactory.java 2011-12-2 下午07:14:43
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */
package com.ianswer.experiments.memcached;

import org.apache.commons.lang.StringUtils;

/**
 * @author lunx
 */
public class SerializerFactory {

	public static SerializerUtil getSerializeClazz(final String type) {
		if (StringUtils.isEmpty(type)) {
			return new JSONUtil();
		} else if (SeriType.JSON.equals(type)) {
			return new JSONUtil();
		} else if (SeriType.KRYO.equals(type)) {
			return new KryoUtil();
		}
		return new JSONUtil();
	}
}

class SeriType {

	public static final String KRYO = "kryo";

	public static final String JSON = "json";

}